package a.j.b;

import a.c.e;
import a.c.k;
import a.c.*;
import a.d.u;
import a.f.d.a.kc;
import a.f.d.a.n;
import a.f.d.a.pc;
import a.i.q;
import a.j.g;
import a.j.ld;

import java.awt.geom.Rectangle2D;
import java.util.*;

public class j
{
  private m_ a;
  private x b;
  private k c;
  private k d;
  private Map e;
  private boolean f = true;
  private kc g;
  private Map h;
  private Map i;
  private boolean j;
  private boolean k = false;
  private double l = 30.0D;
  private HashSet m;
  public static int n;
  
  public boolean a()
  {
    return this.k;
  }
  
  public void a(boolean paramBoolean)
  {
    this.k = paramBoolean;
  }
  
  public double b()
  {
    return this.l;
  }
  
  public void a(double paramDouble)
  {
    this.l = paramDouble;
  }
  
  public boolean c()
  {
    return this.j;
  }
  
  public void b(boolean paramBoolean)
  {
    this.j = paramBoolean;
  }
  
  public boolean d()
  {
    return this.f;
  }
  
  public void c(boolean paramBoolean)
  {
    this.f = paramBoolean;
  }
  
  public void a(g paramg)
  {
    b(paramg);
    c(paramg);
  }
  
  public void b(g paramg)
  {
    int i1 = f.Wb;
    boolean bool = f.Vb;
    this.m = new HashSet();
    a.j.a.j localj = paramg.K();
    w localw = localj.r(null);
    do
    {
      if (!localw.e()) {
        break;
      }
      e locale = localw.d();
      if (i1 == 0)
      {
        if (localj.m(locale))
        {
          ld localld = b(paramg, locale);
          if (i1 != 0) {
            continue;
          }
          if ((localld instanceof f))
          {
            f localf = (f)localld;
            if (i1 != 0) {
              continue;
            }
            if (localf.Z())
            {
              localf.g(false);
              this.m.add(localf);
            }
          }
        }
        localw.f();
      }
    } while (!bool);
  }
  
  public void c(g paramg)
  {
    this.a = m_.a(paramg);
    if ((f.Wb != 0) || (this.a != null)) {
      d(paramg);
    }
  }
  
  private void d(g paramg)
  {
    int i6 = f.Wb;
    boolean bool2 = f.Vb;
    this.b = paramg.B();
    this.e = new HashMap();
    this.h = new HashMap();
    this.i = new HashMap();
    HashMap localHashMap1 = new HashMap();
    if (i6 == 0) {}
    boolean bool1 = !c();
    int i1 = 0;
    int i2 = 0;
    int i3 = 0;
    int i4 = 0;
    double d1 = 0.0D;
    double d2 = 0.0D;
    ArrayList localArrayList = new ArrayList(this.a.b());
    if (this.k) {
      Collections.sort(localArrayList, new e_(bool1, this.a, paramg));
    }
    Object localObject1 = localArrayList.iterator();
    Object localObject3;
    Object localObject4;
    Object localObject5;
    Object localObject6;
    Object localObject7;
    label397:
    label428:
    Object localObject8;
    do
    {
      do
      {
        if (!((Iterator)localObject1).hasNext()) {
          break;
        }
        localObject2 = (f.r_)((Iterator)localObject1).next();
        localObject3 = new f_();
        k_ localk_1 = new k_(null, (f_)localObject3);
        a(((f.r_)localObject2).o(), localk_1, (f_)localObject3);
        this.h.put(localObject2, localObject3);
        localObject4 = new f_();
        localObject5 = new l_(null, (f_)localObject4);
        a(((f.r_)localObject2).l(), (g_)localObject5, (f_)localObject4);
        this.i.put(localObject2, localObject4);
        i1++;
        if (i6 == 0) {
          if (bool1)
          {
            if (i6 == 0) {
              if (i3 < ((f_)localObject3).e.size()) {
                i3 = ((f_)localObject3).e.size();
              }
            }
            i2 += ((f_)localObject4).e.size();
            localObject6 = localObject4;
            localObject7 = localk_1;
            if (i6 != 0) {
              break label428;
            }
            if (!bool2) {
              break label397;
            }
          }
        }
        if (i6 == 0) {
          if (i2 < ((f_)localObject4).e.size()) {
            i2 = ((f_)localObject4).e.size();
          }
        }
        i3 += ((f_)localObject3).e.size();
        localObject6 = localObject3;
        localObject7 = localObject5;
        localHashMap1.put(localObject2, new Integer(i4));
        i4 += ((f_)localObject6).e.size() + 3;
        localObject8 = ((f.r_)localObject2).d();
        if (i6 == 0) {
          if (d1 < ((f_)localObject6).b + ((g_)localObject7).c((u)localObject8)) {
            d1 = ((f_)localObject6).b + ((g_)localObject7).c((u)localObject8);
          }
        }
      } while (d2 >= ((f_)localObject6).d + ((g_)localObject7).d((u)localObject8));
      d2 = ((f_)localObject6).d + ((g_)localObject7).d((u)localObject8);
      if (i6 != 0) {
        break label546;
      }
      if ((i6 == 0) && (bool2)) {
        break label649;
      }
    } while ((i6 == 0) && (!bool2));
    if (bool1)
    {
      label546:
      this.g = new kc(i3 + 2, i2 + 3 * i1 - 1);
      localObject1 = this.g.c(0);
      ((pc)localObject1).a(d1);
      ((pc)localObject1).a(true);
      localObject2 = this.g.c(i3 + 1);
      ((pc)localObject2).a(d2);
      ((pc)localObject2).a(true);
    }
    else
    {
      this.g = new kc(i3 + 3 * i1 - 1, i2 + 2);
      label649:
      localObject1 = this.g.d(0);
      ((n)localObject1).a(d1);
      ((n)localObject1).a(true);
      localObject2 = this.g.d(i2 + 1);
      ((n)localObject2).a(d2);
      ((n)localObject2).a(true);
    }
    localObject1 = new ArrayList(this.a.b());
    l.a((List)localObject1, new Comparator()
    {
      private final boolean val$vertical;
      
      public int compare(Object paramAnonymousObject1, Object paramAnonymousObject2)
      {
        int k = f.Wb;
        f.r_ localr_1 = (f.r_)paramAnonymousObject1;
        f.r_ localr_2 = (f.r_)paramAnonymousObject2;
        if (k == 0) {
          if (this.val$vertical)
          {
            i = ((j.f_)j.this.h.get(localr_1)).e.size();
            j = ((j.f_)j.this.h.get(localr_2)).e.size();
            if (k != 0) {
              break label152;
            }
            if (!f.Vb) {
              break label145;
            }
          }
        }
        int i = ((j.f_)j.this.i.get(localr_1)).e.size();
        int j = ((j.f_)j.this.i.get(localr_2)).e.size();
        label145:
        label152:
        return l.a(j, i);
      }
    });
    Object localObject2 = ((ArrayList)localObject1).iterator();
    label836:
    label837:
    label1272:
    label1277:
    do
    {
      for (;;)
      {
        if (((Iterator)localObject2).hasNext())
        {
          localObject3 = (f.r_)((Iterator)localObject2).next();
          int i5 = ((Integer)localHashMap1.get(localObject3)).intValue();
          if ((i6 != 0) || (i5 > 0))
          {
            if (i6 == 0)
            {
              if (bool1)
              {
                if (i6 != 0) {
                  break label837;
                }
                this.g.d(i5 - 1).a(b());
              }
            }
            else {
              if (!bool2) {
                break label836;
              }
            }
            this.g.c(i5 - 1).a(b());
          }
          localObject4 = this.a.a((f.r_)localObject3);
          localObject5 = new ArrayList();
          a(a.j.a.j.a(paramg), (e)localObject4, (Collection)localObject5);
          localObject6 = paramg.w((e)localObject4);
          localObject7 = new Rectangle2D.Double(((ld)localObject6).a(), ((ld)localObject6).b(), ((ld)localObject6).c(), ((ld)localObject6).d());
          localObject8 = (f_)this.h.get(localObject3);
          f_ localf_ = (f_)this.i.get(localObject3);
          l.a((List)localObject5, new Comparator()
          {
            private final g val$graph;
            
            public int compare(Object paramAnonymousObject1, Object paramAnonymousObject2)
            {
              int i = f.Wb;
              double d1 = this.val$graph.n((e)paramAnonymousObject1);
              double d2 = this.val$graph.n((e)paramAnonymousObject2);
              if (i == 0)
              {
                if (d1 > d2) {
                  return 1;
                }
                if (i != 0) {}
              }
              else if (d1 < d2)
              {
                return -1;
              }
              double d3 = this.val$graph.m((e)paramAnonymousObject1);
              double d4 = this.val$graph.m((e)paramAnonymousObject2);
              if (i == 0) {
                if (d3 > d4) {
                  return 1;
                }
              }
              if (i == 0) {
                if (d3 < d4) {
                  return -1;
                }
              }
              return 0;
            }
          });
          HashMap localHashMap2 = new HashMap();
          k_ localk_2 = new k_((Rectangle2D)localObject7, (f_)localObject8);
          if (i6 == 0)
          {
            if (bool1)
            {
              a(localk_2, new h_(this.g), ((f.r_)localObject3).d().b + localf_.b, (List)localObject5, localHashMap2, paramg);
              if (i6 != 0) {
                break label1071;
              }
            }
          }
          else {
            if (!bool2) {
              break label1057;
            }
          }
          a(localk_2, new h_(this.g), (f.r_)localObject3, i5, (List)localObject5, localf_, localHashMap2, paramg);
          l.a((List)localObject5, new Comparator()
          {
            private final g val$graph;
            
            public int compare(Object paramAnonymousObject1, Object paramAnonymousObject2)
            {
              int i = f.Wb;
              double d1 = this.val$graph.m((e)paramAnonymousObject1);
              double d2 = this.val$graph.m((e)paramAnonymousObject2);
              if (i == 0)
              {
                if (d1 > d2) {
                  return 1;
                }
                if (i != 0) {}
              }
              else if (d1 < d2)
              {
                return -1;
              }
              double d3 = this.val$graph.n((e)paramAnonymousObject1);
              double d4 = this.val$graph.n((e)paramAnonymousObject2);
              if (i == 0) {
                if (d3 > d4) {
                  return 1;
                }
              }
              if (i == 0) {
                if (d3 < d4) {
                  return -1;
                }
              }
              return 0;
            }
          });
          HashMap localHashMap3 = new HashMap();
          l_ locall_ = new l_((Rectangle2D)localObject7, localf_);
          if (i6 == 0)
          {
            if (bool1) {
              a(locall_, new d_(this.g), (f.r_)localObject3, i5, (List)localObject5, (f_)localObject8, localHashMap3, paramg);
            }
          }
          else
          {
            if (i6 != 0) {
              break label1179;
            }
            if (!bool2) {
              break label1178;
            }
          }
          a(locall_, new d_(this.g), ((f.r_)localObject3).d().c + ((f_)localObject8).b, (List)localObject5, localHashMap3, paramg);
          if (i6 == 0)
          {
            if (bool1)
            {
              if (i6 != 0) {
                break label1272;
              }
              this.b.a(localObject4, this.g.a(0, i5, i3 + 1, i5 + localf_.e.size() + 1));
            }
          }
          else {
            if (!bool2) {
              break label1277;
            }
          }
          this.b.a(localObject4, this.g.a(i5, 0, i5 + ((f_)localObject8).e.size() + 1, i2 + 1));
          Iterator localIterator = ((ArrayList)localObject5).iterator();
          if (localIterator.hasNext())
          {
            e locale = (e)localIterator.next();
            this.b.a(locale, this.g.a((pc)localHashMap2.get(locale), (n)localHashMap3.get(locale)));
            if ((i6 != 0) || (i6 != 0)) {
              break label1396;
            }
            if (!bool2)
            {
              if ((i6 == 0) && (bool2)) {
                return;
              }
              if (!bool2) {
                break;
              }
            }
          }
        }
      }
      if (i6 != 0) {
        break label1617;
      }
    } while (i6 != 0);
    label1057:
    label1071:
    if (!this.a.a().isEmpty())
    {
      label1396:
      if (bool1)
      {
        this.g.c().a(b());
        localObject2 = this.g.a(this.g.c(), this.g.d(1));
        localObject3 = this.a.a().iterator();
        while (((Iterator)localObject3).hasNext())
        {
          this.b.a(((Iterator)localObject3).next(), localObject2);
          if (i6 != 0) {
            break label1632;
          }
          if (bool2) {
            return;
          }
        }
      }
      this.g.d().a(b());
      localObject2 = this.g.a(this.g.c(1), this.g.d());
      localObject3 = this.a.a().iterator();
      do
      {
        if (!((Iterator)localObject3).hasNext()) {
          break;
        }
        this.b.a(((Iterator)localObject3).next(), localObject2);
        if ((i6 == 0) && (bool2)) {
          return;
        }
      } while (!bool2);
    }
    label1178:
    label1179:
    this.c = paramg.c(kc.a);
    paramg.a(kc.a, q.a(this.g));
    label1617:
    this.d = paramg.c(kc.b);
    if (i6 == 0) {
      label1632:
      paramg.a(kc.b, this.b);
    }
  }
  
  private void a(g_ paramg_, j_ paramj_, double paramDouble, List paramList, Map paramMap, g paramg)
  {
    int i6 = f.Wb;
    boolean bool = f.Vb;
    double d1 = paramg_.a();
    Object localObject1 = paramj_.a(0);
    if (i6 == 0) {
      if ((localObject1 instanceof n))
      {
        localObject2 = (n)localObject1;
        ((n)localObject2).e(((n)localObject2).b());
        ((n)localObject2).f(d1);
        if (i6 != 0) {
          break label99;
        }
        if (!bool) {
          break label98;
        }
      }
    }
    Object localObject2 = (pc)localObject1;
    ((pc)localObject2).f(((pc)localObject2).b());
    ((pc)localObject2).e(d1);
    label98:
    label99:
    int i1 = 0;
    int i2 = 1;
    double d2 = paramDouble;
    Object localObject3 = paramg_.c().iterator();
    label351:
    label353:
    label492:
    label636:
    do
    {
      Object localObject5;
      double d3;
      double d4;
      double d5;
      do
      {
        if (!((Iterator)localObject3).hasNext()) {
          break label866;
        }
        localObject4 = ((Iterator)localObject3).next();
        localObject5 = paramj_.a(i2);
        paramj_.a(localObject5, true);
        u localu1 = paramg_.c(localObject4);
        d3 = Math.max(paramg_.c(localu1), 0.0D);
        d4 = Math.max(paramg_.d(localu1), 0.0D);
        if (bool) {
          break label886;
        }
        d5 = Math.max(d() ? paramg_.b(localObject4) : paramg_.a(localObject4), d3 + d4);
        if (i6 != 0) {
          break;
        }
        if (!((Iterator)localObject3).hasNext())
        {
          int i3 = i2 + 1;
          int i4 = paramj_.a() - 1;
          do
          {
            if (i3 >= i4) {
              break;
            }
            Object localObject7 = paramj_.a(i3);
            if (i6 != 0) {
              break label353;
            }
            d5 -= paramj_.a(localObject7);
            i3++;
            if (bool) {
              break label351;
            }
          } while (!bool);
        }
      } while (i6 != 0);
      if (i2 == 1)
      {
        Object localObject6 = paramj_.a(0);
        d5 -= paramj_.a(localObject6) - paramDouble;
      }
      double d6 = d3;
      double d7 = d4;
      u localu2 = paramg_.f(localObject4);
      if (i6 == 0) {
        if (localu2 != null)
        {
          d8 = paramg_.c(localu2);
          double d9 = paramg_.d(localu2);
          d6 += d8;
          d7 += d9;
          d5 += d8 + d9;
          this.e.put(localObject4, new i_(localObject5, d8, d9));
          if (i6 != 0) {
            break label492;
          }
          if (!bool) {
            break label481;
          }
        }
      }
      this.e.put(localObject4, new i_(localObject5, 0.0D, 0.0D));
      if (i6 == 0) {
        if (paramj_.b(localObject5) < d6) {
          paramj_.b(localObject5, d6);
        }
      }
      if (i6 == 0)
      {
        if (paramj_.c(localObject5) < d7) {
          paramj_.c(localObject5, d7);
        }
        if (i6 != 0) {}
      }
      else if (paramj_.a(localObject5) < d5)
      {
        paramj_.a(localObject5, d5);
      }
      double d8 = d1;
      if (i6 == 0)
      {
        if (((Iterator)localObject3).hasNext())
        {
          d1 += d2 + d6 - d3 + paramg_.a(localObject4) + d7 - d4;
          d2 = 0.0D;
        }
      }
      else
      {
        if (i6 != 0) {
          break label646;
        }
        if (!bool) {
          break label636;
        }
      }
      d1 = paramg_.b();
      if (i6 == 0) {
        if ((localObject5 instanceof n))
        {
          localObject8 = (n)localObject5;
          d10 = paramg_.a(localObject4);
          ((n)localObject8).e(d10);
          ((n)localObject8).f(d1 - d10 - d7 + d4);
          if (i6 != 0) {
            break label746;
          }
          if (!bool) {
            break label739;
          }
        }
      }
      Object localObject8 = (pc)localObject5;
      double d10 = paramg_.a(localObject4);
      ((pc)localObject8).f(d10);
      ((pc)localObject8).e(d1 - d10 - d7 + d4);
      int i5 = paramList.size();
      do
      {
        do
        {
          if (i1 >= i5) {
            break label853;
          }
          e locale = (e)paramList.get(i1);
          double d11 = paramg_.a(paramg, locale);
          if (bool) {
            break;
          }
          if (i2 != 1)
          {
            if (i6 != 0) {
              break label863;
            }
            if (d8 > d11) {
              break label853;
            }
          }
          if (i6 == 0)
          {
            if (((Iterator)localObject3).hasNext())
            {
              if (i6 != 0) {
                break label863;
              }
              if (d11 >= d1) {
                break label853;
              }
            }
            paramMap.put(locale, localObject5);
            i1++;
          }
        } while (!bool);
        i2++;
      } while (i6 != 0);
    } while (!bool);
    label481:
    label739:
    label746:
    localObject3 = paramj_.a(i2);
    label646:
    label853:
    label863:
    label866:
    if (i6 == 0) {
      if ((localObject3 instanceof n))
      {
        label886:
        localObject4 = (n)localObject3;
        ((n)localObject4).e(((n)localObject4).b());
        if (i6 != 0) {
          break label925;
        }
        ((n)localObject4).f(d1);
        if (!bool) {
          return;
        }
      }
    }
    label925:
    Object localObject4 = (pc)localObject3;
    ((pc)localObject4).f(((pc)localObject4).b());
    ((pc)localObject4).e(d1);
  }
  
  private void a(g_ paramg_, j_ paramj_, f.r_ paramr_, int paramInt, List paramList, f_ paramf_, Map paramMap, g paramg)
  {
    int i4 = f.Wb;
    boolean bool = f.Vb;
    double d1 = paramg_.c(paramr_.d()) + paramf_.b;
    double d2 = paramg_.a();
    Object localObject1 = paramj_.a(paramInt);
    paramj_.a(localObject1, d1);
    paramj_.a(localObject1, true);
    if (i4 == 0) {
      if ((localObject1 instanceof n))
      {
        localObject2 = (n)localObject1;
        ((n)localObject2).e(d1);
        ((n)localObject2).f(d2);
        if (i4 != 0) {
          break label133;
        }
        if (!bool) {
          break label132;
        }
      }
    }
    Object localObject2 = (pc)localObject1;
    ((pc)localObject2).f(d1);
    ((pc)localObject2).e(d2);
    label132:
    label133:
    int i1 = 0;
    int i2 = paramInt + 1;
    Object localObject3 = paramg_.c().iterator();
    if (((Iterator)localObject3).hasNext()) {}
    label406:
    label447:
    label504:
    while (i4 != 0)
    {
      Object localObject4 = ((Iterator)localObject3).next();
      Object localObject5 = paramj_.a(i2);
      paramj_.a(localObject5, true);
      localObject6 = paramg_.c(localObject4);
      double d4 = Math.max(paramg_.c((u)localObject6), 0.0D);
      double d5 = Math.max(paramg_.d((u)localObject6), 0.0D);
      if (i4 != 0) {
        break label747;
      }
      if (bool) {
        break label745;
      }
      double d6 = Math.max(d() ? paramg_.b(localObject4) : paramg_.a(localObject4), d4 + d5);
      double d7 = d4;
      double d8 = d5;
      u localu = paramg_.f(localObject4);
      if (i4 == 0) {
        if (localu != null)
        {
          d9 = paramg_.c(localu);
          double d10 = paramg_.d(localu);
          d7 += d9;
          d8 += d10;
          d6 += d9 + d10;
          this.e.put(localObject4, new i_(localObject5, d9, d10));
          if (i4 != 0) {
            break label447;
          }
          if (!bool) {
            break label406;
          }
        }
      }
      this.e.put(localObject4, new i_(localObject5, 0.0D, 0.0D));
      paramj_.b(localObject5, d7);
      paramj_.c(localObject5, d8);
      paramj_.a(localObject5, d6);
      double d9 = d2;
      if (i4 == 0)
      {
        if (((Iterator)localObject3).hasNext())
        {
          d2 += d1 + d7 - d4 + paramg_.a(localObject4) + d8 - d5;
          d1 = 0.0D;
        }
      }
      else
      {
        if (i4 != 0) {
          break label514;
        }
        if (!bool) {
          break label504;
        }
      }
      d2 = paramg_.b();
      if (i4 == 0) {
        if ((localObject5 instanceof n))
        {
          localObject7 = (n)localObject5;
          d11 = paramg_.a(localObject4);
          ((n)localObject7).e(d11);
          ((n)localObject7).f(d2 - d11 - d8 + d5);
          if (i4 != 0) {
            break label614;
          }
          if (!bool) {
            break label607;
          }
        }
      }
      Object localObject7 = (pc)localObject5;
      double d11 = paramg_.a(localObject4);
      ((pc)localObject7).f(d11);
      ((pc)localObject7).e(d2 - d11 - d8 + d5);
      int i3 = paramList.size();
      do
      {
        e locale;
        double d12;
        do
        {
          if (i1 >= i3) {
            break;
          }
          locale = (e)paramList.get(i1);
          d12 = paramg_.a(paramg, locale);
        } while (bool);
        if (i2 != paramInt + 1)
        {
          if (i4 != 0) {
            break label729;
          }
          if (d9 > d12) {
            break;
          }
        }
        if (i4 == 0)
        {
          if (((Iterator)localObject3).hasNext())
          {
            if (i4 != 0) {
              break label729;
            }
            if (d12 >= d2) {
              break;
            }
          }
          paramMap.put(locale, localObject5);
          i1++;
        }
      } while (!bool);
      i2++;
      if (!bool) {
        break;
      }
    }
    label514:
    label607:
    label614:
    label745:
    localObject3 = paramj_.a(i2);
    label729:
    label747:
    double d3 = paramg_.d(paramr_.d()) + paramf_.d;
    paramj_.a(localObject3, d3);
    paramj_.a(localObject3, true);
    if (i4 == 0) {
      if ((localObject3 instanceof n))
      {
        localObject6 = (n)localObject3;
        ((n)localObject6).e(d3);
        if (i4 != 0) {
          break label832;
        }
        ((n)localObject6).f(d2);
        if (!bool) {
          return;
        }
      }
    }
    label832:
    Object localObject6 = (pc)localObject3;
    ((pc)localObject6).f(d3);
    ((pc)localObject6).e(d2);
  }
  
  private static void a(a.j.a.j paramj, e parame, Collection paramCollection)
  {
    int i1 = f.Wb;
    boolean bool = f.Vb;
    w localw = paramj.r(parame);
    label91:
    label92:
    do
    {
      if (!localw.e()) {
        break;
      }
      e locale = localw.d();
      if (i1 == 0) {
        if (paramj.m(locale))
        {
          if (i1 != 0) {
            break label91;
          }
          if (paramj.r(locale).e())
          {
            a(paramj, locale, paramCollection);
            if (i1 != 0) {
              continue;
            }
            if (!bool) {
              break label92;
            }
          }
        }
      }
      paramCollection.add(locale);
      localw.f();
    } while (!bool);
  }
  
  private void a(Collection paramCollection, g_ paramg_, f_ paramf_)
  {
    int i1 = f.Wb;
    boolean bool = f.Vb;
    double d1 = 0.0D;
    double d2 = 0.0D;
    Iterator localIterator = paramCollection.iterator();
    do
    {
      do
      {
        do
        {
          if (!localIterator.hasNext()) {
            break;
          }
          Object localObject = localIterator.next();
          a(localObject, paramg_, paramf_);
          if (i1 == 0) {
            if (d1 < paramf_.b) {
              d1 = paramf_.b;
            }
          }
        } while (d2 >= paramf_.d);
        d2 = paramf_.d;
        if (i1 != 0) {
          break label119;
        }
        if ((i1 == 0) && (bool)) {
          return;
        }
      } while (i1 != 0);
    } while (!bool);
    paramf_.b = d1;
    label119:
    paramf_.d = d2;
  }
  
  private void a(Object paramObject, g_ paramg_, f_ paramf_)
  {
    int i2 = f.Wb;
    boolean bool = f.Vb;
    u localu = paramg_.c(paramObject);
    if (i2 == 0)
    {
      if (paramg_.d(paramObject) == 0)
      {
        paramf_.e.add(paramObject);
        paramf_.f.put(paramObject, paramg_.a(paramf_.a, paramf_.c));
        paramf_.b = paramg_.a(localu);
        paramf_.d = paramg_.b(localu);
      }
    }
    else if (!bool) {
      return;
    }
    double d1 = 0.0D;
    double d2 = 0.0D;
    double d3 = paramf_.a;
    double d4 = paramf_.c;
    int i1 = 1;
    Iterator localIterator = paramg_.e(paramObject).iterator();
    label196:
    label203:
    label241:
    do
    {
      do
      {
        do
        {
          if (!localIterator.hasNext()) {
            break;
          }
          Object localObject = localIterator.next();
          if (i2 == 0)
          {
            if (i1 != 0)
            {
              paramf_.a = (paramg_.c(localu) + d3);
              i1 = 0;
            }
          }
          else
          {
            if (i2 != 0) {
              break label203;
            }
            if (!bool) {
              break label196;
            }
          }
          paramf_.a = 0.0D;
          if (i2 == 0)
          {
            if (localIterator.hasNext()) {
              paramf_.c = 0.0D;
            }
          }
          else
          {
            if (i2 != 0) {
              break label256;
            }
            if (!bool) {
              break label241;
            }
          }
          paramf_.c = (paramg_.d(localu) + d4);
          a(localObject, paramg_, paramf_);
          if (i2 == 0) {
            if (d1 < paramf_.b) {
              d1 = paramf_.b;
            }
          }
        } while (d2 >= paramf_.d);
        if (i2 != 0) {
          break label339;
        }
        d2 = paramf_.d;
        if (i2 != 0) {
          break label323;
        }
        if (bool) {
          break label338;
        }
      } while (i2 != 0);
    } while (!bool);
    label256:
    paramf_.a = d3;
    paramf_.c = d4;
    label323:
    paramf_.b = (paramg_.a(localu) + d1);
    label338:
    label339:
    paramf_.d = (paramg_.b(localu) + d2);
  }
  
  public void e(g paramg)
  {
    g(paramg);
    f(paramg);
  }
  
  public void f(g paramg)
  {
    int i1 = f.Wb;
    boolean bool = f.Vb;
    if (i1 == 0)
    {
      if (this.m != null)
      {
        Iterator localIterator = this.m.iterator();
        do
        {
          if (!localIterator.hasNext()) {
            break;
          }
          f localf = (f)localIterator.next();
          localf.g(true);
          if ((i1 == 0) && (bool)) {
            return;
          }
        } while (!bool);
      }
      if (i1 != 0) {}
    }
    else
    {
      this.m = null;
    }
  }
  
  public void g(g paramg)
  {
    if (f.Wb == 0)
    {
      if (this.a != null) {
        h(paramg);
      }
    }
    else {
      this.a = null;
    }
  }
  
  private void h(g paramg)
  {
    int i6 = f.Wb;
    boolean bool = f.Vb;
    if (i6 == 0) {}
    int i1 = !c() ? 1 : 0;
    double d1 = i1 != 0 ? this.g.c(0).e() : this.g.d(0).e();
    z localz = i1 != 0 ? this.g.e() : this.g.f();
    if (i6 == 0) {
      if (!this.a.a().isEmpty())
      {
        localz.remove(localz.size() - 1);
        localz.remove(localz.size() - 1);
      }
    }
    Iterator localIterator = this.a.b().iterator();
    label344:
    label886:
    label893:
    do
    {
      Object localObject1;
      while (!((Iterator)localObject1).hasNext())
      {
        f.r_ localr_;
        int i2;
        Object localObject3;
        i_ locali_3;
        double d4;
        double d6;
        do
        {
          e locale;
          Object localObject2;
          int i5;
          double d3;
          double d5;
          do
          {
            if (!localIterator.hasNext()) {
              break label940;
            }
            localr_ = (f.r_)localIterator.next();
            locale = this.a.a(localr_);
            if (i1 == 0) {
              break;
            }
            localObject1 = ((f_)this.h.get(localr_)).e;
            i2 = ((List)localObject1).size();
            localf = a(paramg, locale);
            d2 = localf.rb();
            if (d2 < d1)
            {
              localObject2 = (f.p_)((List)localObject1).get(0);
              i_ locali_1 = (i_)this.e.get(localObject2);
              this.e.put(localObject2, new i_(locali_1.a, locali_1.b - d1 + d2, locali_1.d));
            }
            localObject2 = localz.f();
            int i3 = 0;
            i5 = i2 + 1;
            do
            {
              if (i3 >= i5) {
                break label344;
              }
              localObject2 = ((v)localObject2).a();
              i3++;
              if ((i6 == 0) && (bool)) {
                break;
              }
            } while (!bool);
            if (i6 != 0) {
              break label546;
            }
            d3 = 0.0D;
            do
            {
              if (localObject2 == null) {
                break label399;
              }
              pc localpc = (pc)((v)localObject2).c();
              d3 += localpc.e();
              localObject2 = ((v)localObject2).a();
              if ((i6 == 0) && (bool)) {
                break;
              }
            } while (!bool);
            d5 = localf.sb();
          } while (i6 != 0);
          if (d5 >= d3) {
            break;
          }
          if (i6 != 0) {
            break label821;
          }
          localObject3 = (f.p_)((List)localObject1).get(i2 - 1);
          locali_3 = (i_)this.e.get(localObject3);
          this.e.put(localObject3, new i_(locali_3.a, locali_3.b, locali_3.d - d3 + d5));
          if (!bool) {
            break;
          }
          localObject1 = ((f_)this.i.get(localr_)).e;
          i2 = ((List)localObject1).size();
          f localf = a(paramg, locale);
          double d2 = localf.tb();
          do
          {
            if (d2 < d1)
            {
              localObject2 = (f.n_)((List)localObject1).get(0);
              i_ locali_2 = (i_)this.e.get(localObject2);
              this.e.put(localObject2, new i_(locali_2.a, locali_2.b - d1 + d2, locali_2.d));
            }
            localObject2 = localz.f();
            int i4 = 0;
            i5 = i2 + 1;
            do
            {
              if (i4 >= i5) {
                break label667;
              }
              localObject2 = ((v)localObject2).a();
              i4++;
              if ((i6 == 0) && (bool)) {
                break;
              }
            } while (!bool);
          } while (i6 != 0);
          d4 = 0.0D;
          do
          {
            if (localObject2 == null) {
              break label722;
            }
            n localn = (n)((v)localObject2).c();
            d4 += localn.e();
            localObject2 = ((v)localObject2).a();
            if ((i6 == 0) && (bool)) {
              break;
            }
          } while (!bool);
          d6 = localf.ub();
        } while (i6 != 0);
        if (d6 < d4)
        {
          localObject3 = (f.n_)((List)localObject1).get(i2 - 1);
          locali_3 = (i_)this.e.get(localObject3);
          this.e.put(localObject3, new i_(locali_3.a, locali_3.b, locali_3.d - d4 + d6));
        }
        localObject1 = localr_.o().iterator();
        do
        {
          do
          {
            if (!((Iterator)localObject1).hasNext()) {
              break;
            }
            a((f.p_)((Iterator)localObject1).next());
            if (i6 != 0) {
              break label893;
            }
            if (bool) {
              break label886;
            }
          } while (!bool);
        } while (i6 != 0);
        localObject1 = localr_.l().iterator();
      }
      if (i6 != 0) {
        break label963;
      }
      a((f.n_)((Iterator)localObject1).next());
      if (i6 != 0) {
        break label950;
      }
      if ((bool) || ((i6 == 0) && (bool))) {
        break label962;
      }
    } while (!bool);
    label399:
    label546:
    label722:
    this.i = null;
    label667:
    label821:
    this.h = null;
    label940:
    label950:
    if (i6 == 0)
    {
      paramg.j(kc.a);
      label962:
      label963:
      if (i6 != 0) {
        break label1019;
      }
      if (this.c != null)
      {
        paramg.a(kc.a, this.c);
        this.c = null;
      }
    }
    paramg.j(kc.b);
    paramg.a(this.b);
    this.b = null;
    if (i6 == 0)
    {
      if (this.d != null) {
        label1019:
        paramg.a(kc.b, this.d);
      }
    }
    else {
      this.d = null;
    }
  }
  
  private void a(f.p_ paramp_)
  {
    int i1 = f.Wb;
    boolean bool = f.Vb;
    if ((i1 != 0) || (paramp_.n() == 0))
    {
      i_ locali_ = (i_)this.e.get(paramp_);
      pc localpc = (pc)locali_.a;
      paramp_.b(localpc.e() - locali_.b - locali_.d);
      if (!bool) {}
    }
    else
    {
      double d1 = 0.0D;
      Iterator localIterator = paramp_.o().iterator();
      if (localIterator.hasNext()) {}
      while (i1 != 0)
      {
        f.p_ localp_ = (f.p_)localIterator.next();
        a(localp_);
        d1 += localp_.g();
        if ((i1 == 0) && (bool)) {
          return;
        }
        if (!bool) {
          break;
        }
      }
      paramp_.b(paramp_.i().b + d1 + paramp_.i().d);
    }
  }
  
  private void a(f.n_ paramn_)
  {
    int i1 = f.Wb;
    boolean bool = f.Vb;
    if ((i1 != 0) || (paramn_.k() == 0))
    {
      i_ locali_ = (i_)this.e.get(paramn_);
      n localn = (n)locali_.a;
      paramn_.b(localn.e() - locali_.b - locali_.d);
      if (!bool) {}
    }
    else
    {
      double d1 = 0.0D;
      Iterator localIterator = paramn_.l().iterator();
      if (localIterator.hasNext()) {}
      while (i1 != 0)
      {
        f.n_ localn_ = (f.n_)localIterator.next();
        a(localn_);
        d1 += localn_.g();
        if ((i1 == 0) && (bool)) {
          return;
        }
        if (!bool) {
          break;
        }
      }
      paramn_.b(paramn_.i().c + d1 + paramn_.i().e);
    }
  }
  
  private static f a(g paramg, e parame)
  {
    return (f)b(paramg, parame);
  }
  
  private static ld b(g paramg, e parame)
  {
    return m.a(paramg, parame);
  }
  
  private static final class m_
  {
    private final Collection a;
    private final Collection c;
    private final Map e;
    
    m_(Collection paramCollection1, Collection paramCollection2, Map paramMap)
    {
      this.a = Collections.unmodifiableCollection(paramCollection1);
      this.c = Collections.unmodifiableCollection(paramCollection2);
      this.e = paramMap;
    }
    
    public Collection a()
    {
      return this.a;
    }
    
    Collection b()
    {
      return this.c;
    }
    
    e a(f.r_ paramr_)
    {
      return (e)this.e.get(paramr_);
    }
    
    static m_ a(g paramg)
    {
      int i = f.Wb;
      boolean bool = f.Vb;
      a.j.a.j localj = a.j.a.j.a(paramg);
      if (localj == null) {
        return null;
      }
      ArrayList localArrayList1 = new ArrayList();
      ArrayList localArrayList2 = new ArrayList();
      HashMap localHashMap = new HashMap();
      w localw1 = paramg.v();
      label312:
      label321:
      do
      {
        if (!localw1.e()) {
          break;
        }
        e locale1 = localw1.d();
        if (bool) {
          break label338;
        }
        if ((i != 0) || (localj.p(locale1) == null)) {
          if (i == 0)
          {
            if (localj.m(locale1))
            {
              ld localld = j.b(paramg, locale1);
              if (i == 0) {
                if ((localld instanceof f))
                {
                  localObject = ((f)localld).eb();
                  localArrayList2.add(localObject);
                  localHashMap.put(localObject, locale1);
                  if (i != 0) {
                    continue;
                  }
                  if (!bool) {
                    break label312;
                  }
                }
              }
              localArrayList1.add(locale1);
              Object localObject = new ArrayList();
              do
              {
                ((ArrayList)localObject).add(locale1);
                w localw2;
                while (!localw2.e())
                {
                  if (((ArrayList)localObject).isEmpty()) {
                    break;
                  }
                  e locale2 = (e)((ArrayList)localObject).remove(((ArrayList)localObject).size() - 1);
                  localw2 = localj.r(locale2);
                }
                localArrayList1.add(localw2.d());
                if (i != 0) {
                  break label321;
                }
                do
                {
                  if (bool) {
                    break;
                  }
                } while (i != 0);
                if (bool) {
                  break;
                }
                if (localj.m(localw2.d())) {
                  ((ArrayList)localObject).add(localw2.d());
                }
                localw2.f();
              } while (!bool);
            }
            else
            {
              if (i != 0) {
                continue;
              }
            }
          }
          else {
            localArrayList1.add(locale1);
          }
        }
        localw1.f();
      } while (!bool);
      if ((i == 0) && (localArrayList2.isEmpty())) {
        return null;
      }
      label338:
      return new m_(localArrayList1, localArrayList2, localHashMap);
    }
  }
  
  private static final class i_
  {
    final Object a;
    final double b;
    final double d;
    
    i_(Object paramObject, double paramDouble1, double paramDouble2)
    {
      this.a = paramObject;
      this.b = paramDouble1;
      this.d = paramDouble2;
    }
  }
  
  private static final class k_
    implements j.g_
  {
    private final Rectangle2D a;
    private final j.f_ c;
    
    k_(Rectangle2D paramRectangle2D, j.f_ paramf_)
    {
      this.a = paramRectangle2D;
      this.c = paramf_;
    }
    
    public double a(Object paramObject)
    {
      return ((f.p_)paramObject).g();
    }
    
    public void a(Object paramObject, double paramDouble)
    {
      ((f.p_)paramObject).b(paramDouble);
    }
    
    public double b(Object paramObject)
    {
      return ((f.p_)paramObject).f();
    }
    
    public u c(Object paramObject)
    {
      return ((f.p_)paramObject).i();
    }
    
    public int d(Object paramObject)
    {
      return ((f.p_)paramObject).n();
    }
    
    public Collection e(Object paramObject)
    {
      return ((f.p_)paramObject).o();
    }
    
    public u a(double paramDouble1, double paramDouble2)
    {
      return new u(paramDouble1, 0.0D, paramDouble2, 0.0D);
    }
    
    public double a(u paramu)
    {
      return paramu.c;
    }
    
    public double b(u paramu)
    {
      return paramu.e;
    }
    
    public double c(u paramu)
    {
      return paramu.b;
    }
    
    public double d(u paramu)
    {
      return paramu.d;
    }
    
    public double a()
    {
      return this.a.getY();
    }
    
    public double b()
    {
      return this.a.getMaxY();
    }
    
    public double a(g paramg, e parame)
    {
      return paramg.n(parame);
    }
    
    public Collection c()
    {
      return this.c.e;
    }
    
    public u f(Object paramObject)
    {
      return (u)this.c.f.get(paramObject);
    }
  }
  
  private static final class l_
    implements j.g_
  {
    private final Rectangle2D a;
    private final j.f_ b;
    
    l_(Rectangle2D paramRectangle2D, j.f_ paramf_)
    {
      this.a = paramRectangle2D;
      this.b = paramf_;
    }
    
    public double a(Object paramObject)
    {
      return ((f.n_)paramObject).g();
    }
    
    public void a(Object paramObject, double paramDouble)
    {
      ((f.n_)paramObject).b(paramDouble);
    }
    
    public double b(Object paramObject)
    {
      return ((f.n_)paramObject).f();
    }
    
    public u c(Object paramObject)
    {
      return ((f.n_)paramObject).i();
    }
    
    public int d(Object paramObject)
    {
      return ((f.n_)paramObject).k();
    }
    
    public Collection e(Object paramObject)
    {
      return ((f.n_)paramObject).l();
    }
    
    public u a(double paramDouble1, double paramDouble2)
    {
      return new u(0.0D, paramDouble1, 0.0D, paramDouble2);
    }
    
    public double a(u paramu)
    {
      return paramu.b;
    }
    
    public double b(u paramu)
    {
      return paramu.d;
    }
    
    public double c(u paramu)
    {
      return paramu.c;
    }
    
    public double d(u paramu)
    {
      return paramu.e;
    }
    
    public double a()
    {
      return this.a.getX();
    }
    
    public double b()
    {
      return this.a.getMaxX();
    }
    
    public double a(g paramg, e parame)
    {
      return paramg.m(parame);
    }
    
    public Collection c()
    {
      return this.b.e;
    }
    
    public u f(Object paramObject)
    {
      return (u)this.b.f.get(paramObject);
    }
  }
  
  private static abstract interface g_
  {
    public abstract double a(Object paramObject);
    
    public abstract void a(Object paramObject, double paramDouble);
    
    public abstract double b(Object paramObject);
    
    public abstract u c(Object paramObject);
    
    public abstract int d(Object paramObject);
    
    public abstract Collection e(Object paramObject);
    
    public abstract u a(double paramDouble1, double paramDouble2);
    
    public abstract double a(u paramu);
    
    public abstract double b(u paramu);
    
    public abstract double c(u paramu);
    
    public abstract double d(u paramu);
    
    public abstract double a();
    
    public abstract double b();
    
    public abstract double a(g paramg, e parame);
    
    public abstract Collection c();
    
    public abstract u f(Object paramObject);
  }
  
  private static final class h_
    implements j.j_
  {
    private final kc a;
    
    h_(kc paramkc)
    {
      this.a = paramkc;
    }
    
    public void a(Object paramObject, boolean paramBoolean)
    {
      ((pc)paramObject).a(paramBoolean);
    }
    
    public double a(Object paramObject)
    {
      return ((pc)paramObject).b();
    }
    
    public void a(Object paramObject, double paramDouble)
    {
      ((pc)paramObject).a(paramDouble);
    }
    
    public double b(Object paramObject)
    {
      return ((pc)paramObject).c();
    }
    
    public void b(Object paramObject, double paramDouble)
    {
      ((pc)paramObject).b(paramDouble);
    }
    
    public double c(Object paramObject)
    {
      return ((pc)paramObject).d();
    }
    
    public void c(Object paramObject, double paramDouble)
    {
      ((pc)paramObject).c(paramDouble);
    }
    
    public Object a(int paramInt)
    {
      return this.a.c(paramInt);
    }
    
    public int a()
    {
      return this.a.e().size();
    }
  }
  
  private static final class d_
    implements j.j_
  {
    private final kc a;
    
    d_(kc paramkc)
    {
      this.a = paramkc;
    }
    
    public void a(Object paramObject, boolean paramBoolean)
    {
      ((n)paramObject).a(paramBoolean);
    }
    
    public double a(Object paramObject)
    {
      return ((n)paramObject).b();
    }
    
    public void a(Object paramObject, double paramDouble)
    {
      ((n)paramObject).a(paramDouble);
    }
    
    public double b(Object paramObject)
    {
      return ((n)paramObject).c();
    }
    
    public void b(Object paramObject, double paramDouble)
    {
      ((n)paramObject).b(paramDouble);
    }
    
    public double c(Object paramObject)
    {
      return ((n)paramObject).d();
    }
    
    public void c(Object paramObject, double paramDouble)
    {
      ((n)paramObject).c(paramDouble);
    }
    
    public Object a(int paramInt)
    {
      return this.a.d(paramInt);
    }
    
    public int a()
    {
      return this.a.f().size();
    }
  }
  
  private static abstract interface j_
  {
    public abstract void a(Object paramObject, boolean paramBoolean);
    
    public abstract double a(Object paramObject);
    
    public abstract void a(Object paramObject, double paramDouble);
    
    public abstract double b(Object paramObject);
    
    public abstract void b(Object paramObject, double paramDouble);
    
    public abstract double c(Object paramObject);
    
    public abstract void c(Object paramObject, double paramDouble);
    
    public abstract Object a(int paramInt);
    
    public abstract int a();
  }
  
  private static final class f_
  {
    double a;
    double b;
    double c;
    double d;
    final List e = new ArrayList();
    final Map f = new HashMap();
  }
  
  static class e_
    implements Comparator
  {
    private boolean a;
    private j.m_ b;
    private g c;
    
    e_(boolean paramBoolean, j.m_ paramm_, g paramg)
    {
      this.a = paramBoolean;
      this.b = paramm_;
      this.c = paramg;
    }
    
    public int compare(Object paramObject1, Object paramObject2)
    {
      e locale1 = this.b.a((f.r_)paramObject1);
      e locale2 = this.b.a((f.r_)paramObject2);
      if (f.Wb == 0) {}
      return this.a ? l.a(this.c.m(locale1), this.c.m(locale2)) : l.a(this.c.n(locale1), this.c.n(locale2));
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.j.b.j

 * JD-Core Version:    0.7.0.1

 */